Helpful Information
 
 
Category: mod_rewrite
mod_rewrite -> file

How do you set up mod_rewrite (on apache2) to append .php to a url if the file exists? I've tried

RewriteEngine On
RewriteCond %{REQUEST_URI}.php -f
RewriteRule ^(.*)$ $0.php

But that doesn't work

Trib..
take a look at THIS (http://forums.llamasery.com/showthread.php?t=4979) link.. not only is it about mod rewrite but it also has lots of links to other references within the post about mod rewrite.

Sir P

Thanks, but I can't see anything relating to what I want. TBH, I don't see why my previous method doesn't work. It should (or am I missing something.)










privacy (GDPR)